
package com.uuah.server.api;

import com.uuah.server.api.transformer.IBaseTransformer;
import com.uuah.server.api.transport.IMessageAdapter;
import com.uuah.server.exception.transformer.TransformerException;


public interface IUuahMessage extends IMessageAdapter {

	IMessageAdapter getAdapter();

	IMessageAdapter getOriginalAdapter();

	void applyTransformer(IBaseTransformer transformer)
			throws TransformerException;

	void applyTransformer(IBaseTransformer transformer, Class outputType)
			throws TransformerException;

	void setPayload(Object payload);

	Object getPayload(Class outputType) throws TransformerException;

	String getPayloadAsString(String encoding) throws Exception;

	String getPayloadAsString() throws Exception;

	byte[] getPayloadAsBytes() throws Exception;

	Object getOrginalPayload();
}
